<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

	defined('_JEXEC') or die('Restricted Access');
	
	$end_page_title = "";
	$end_page_description = "";
	$form_target = "";
	$redirection_url = "";
	$redirection_msg = "";
	$disabled = "";
	
	if($this->values != ""){
		$end_page_title = $this->values["0"]["end_page_title"];
		$end_page_description = $this->values["0"]["end_page_description"];
		$form_target = $this->values["0"]["form_target"];
		$redirection_url = $this->values["0"]["redirection_url"];
		$redirection_msg = $this->values["0"]["redirection_msg"];				
	}
?>

<table border="0" cellpadding="3" cellspacing="0" width="100%" class="adminform">
	<tr>
		<td width="15%" align="left"><b><?php echo JText::_("COM_SURVEYS_END_PAGE_TITLE"); ?> :</b></td>
		<?php
			$end_page_title = str_replace('"', "&quot;", $end_page_title);
		?>
		<td width="85%" align="left"> <input type="text" size="50" maxlength="250" name="end_page_title" value="<?php echo stripslashes($end_page_title); ?>" /></td>
	</tr>
	<tr>
		<td align="left"><b><?php echo JText::_("COM_SURVEYS_END_PAGE_DESCRIPTION"); ?></b></td>
		<td align="left">
			<?php 
			$editor3  =& JFactory::getEditor();			
			$end_page_description = str_replace('\\&quot;', '', $end_page_description);
			echo $editor3->display('end_page_description',  ''.stripslashes($end_page_description) , '100%', '250px', '10', '45'); 
			?>
		</td>
	</tr>
	<tr>
		<td align="left"><b><?php echo JText::_("COM_SURVEYS_FORM_TARGET"); ?> :</b></td>
		<td align="left">
			<select name="form_target" id="form_target" onchange="Javascript:check_form_target(this,'redirection_url','redirection_msg');">
				<option value="0"<?php if($form_target == "0") echo " selected" ; ?>><?php echo JText::_("COM_SURVEYS_SHOW_END_PAGE"); ?></option>
				<option value="1"<?php if($form_target == "1") echo " selected" ; ?>><?php echo JText::_("COM_SURVEYS_REDIRECT_TO_URL"); ?></option>
			</select>
		</td>
	</tr>
	<?php
		if($form_target == "1"){
			$disabled = '';
		}
		else{
			$disabled = ' disabled="disabled"; ';
		}
	?>
	<tr>
		<td align="left"> <b><?php echo JText::_("COM_SURVEYS_REDIRECTION_URL"); ?> :</b> </td>
		<td align="left"> <input type="text" size="50" maxlength="250" name="redirection_url" value="<?php echo $redirection_url; ?>" <?php echo $disabled; ?> /></td>
	</tr>
	<tr>
		<td align="left"> <b><?php echo JText::_("COM_SURVEYS_REDIRECTION_MSG"); ?> :</b> </td>
		<td align="left"> <input type="text" size="50" maxlength="250" name="redirection_msg" value="<?php echo $redirection_msg; ?>" <?php echo $disabled; ?> /></td>
	</tr>				
</table>